package com.mes.bac.backend.common.exception;

import lombok.Getter;

/**
 * 自定义业务异常类
 */
@Getter
public class BusinessException extends RuntimeException {

    private final int code;

    public BusinessException(String message) {
        super(message);
        this.code = 500; // 默认业务异常状态码
    }

    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
    }
}